package com.dhgate.spu.analysis.bean;

import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

/** 
 * @author:      wangguodong 
 * @create:      2014-2-13 下午4:05:59 
 * @description: 
 */
public class Product {
	private int indexNumber;//建立到索引的时候的编号(以备数据量太大没法一次性获取所有doc可以用于翻页)
	private long itemCode;//ic
	private String productName;//产品名称
	private String prodLineId;//产品线id
	private String supplierid;//供应商id
	private String shortDescription;
	private String keywords;
	
	private Map<Long,List<Long>> attrMap = new HashMap<Long,List<Long>>();//attrId=>attrValIdList
	private Map<String,String> fieldMap = new HashMap<String,String>();//数据库里面存储的字段
	private Map<String,String> extFieldMap = new HashMap<String,String>();//通过程序抽取出的字段
	private Set<Long> attrValIdSet = new HashSet<Long>();
	
	
	public Set<Long> getAttrValIdSet() {
		return attrValIdSet;
	}

	public void setAttrValIdSet(Set<Long> attrValIdSet) {
		this.attrValIdSet = attrValIdSet;
	}
	
	public void addAttrValIdSet(Long attrValId){
		this.attrValIdSet.add(attrValId);
	}
	public void removeAttrValIdSet(Long attrValId){
		this.attrValIdSet.remove(attrValId);
	}

	public void setFieldMap(Map<String, String> fieldMap) {
		this.fieldMap = fieldMap;
	}

	public void setExtFieldMap(Map<String, String> extFieldMap) {
		this.extFieldMap = extFieldMap;
	}

	public Map<String, String> getFieldMap() {
		return fieldMap;
	}

	public Map<String, String> getExtFieldMap() {
		return extFieldMap;
	}
	
	public Map<Long, List<Long>> getAttrMap() {
		return attrMap;
	}

	public void setAttrMap(Map<Long, List<Long>> attrMap) {
		this.attrMap = attrMap;
	}
	
	public  List<Long> getAttrValIdList(Long attrId){
		return attrMap.get(attrId);
	}
	
	public void setAttrValIdList(Long attrId, List<Long> attrValIdList){
		attrMap.put(attrId, attrValIdList);
	}
	
	public void setField(String fieldName, String fieldValue){
		fieldMap.put(fieldName, fieldValue);
	}
	
	public void setExtField(String extFieldName, String extFieldValue){
		extFieldMap.put(extFieldName, extFieldValue);
	}
	
	public String getField(String filedName){
		return fieldMap.get(filedName);
	}
	
	public String getExtField(String extFiledName){
		return extFieldMap.get(extFiledName);
	}
	
	public int getIndexNumber() {
		return indexNumber;
	}
	public void setIndexNumber(int indexNumber) {
		this.indexNumber = indexNumber;
	}
	
	public long getItemCode() {
		return itemCode;
	}
	public void setItemCode(long itemCode) {
		this.itemCode = itemCode;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getProdLineId() {
		return prodLineId;
	}
	public void setProdLineId(String prodLineId) {
		this.prodLineId = prodLineId;
	}

	public String getSupplierid() {
		return supplierid;
	}

	public void setSupplierid(String supplierid) {
		this.supplierid = supplierid;
	}

	/**
	 * @return the shortDescription
	 */
	public String getShortDescription() {
		return shortDescription;
	}

	/**
	 * @param shortDescription the shortDescription to set
	 */
	public void setShortDescription(String shortDescription) {
		this.shortDescription = shortDescription;
	}

	/**
	 * @return the keywords
	 */
	public String getKeywords() {
		return keywords;
	}

	/**
	 * @param keywords the keywords to set
	 */
	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}
	
	
	
}
